home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Animation
/
Animation Vol.1 (Profi ROM)(1994).iso
/
pool
/
updates
/
symantec
/
rtlinc.exe
/
SIGNAL.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-19
|
3KB
|
123 lines
/*_ signal.h Mon Dec 25 1989 Modified by: Walter Bright */
#ifndef __SIGNAL_H
#define __SIGNAL_H 1
#if __cplusplus
extern "C" {
#endif
#ifdef __STDC__
#define __CDECL
#define __STDCALL
#else
#define __CDECL __cdecl
#define __STDCALL __stdcall
#endif
#if __OS2__ && __INTSIZE == 4
#define __CLIB __STDCALL
#else
#define __CLIB __CDECL
#endif
typedef volatile int sig_atomic_t;
void (__CLIB *signal(int,void (__CLIB *)(int)))(int);
#if M_UNIX || M_XENIX
#define SIGHUP 1
#define SIGINT 2
#define SIGQUIT 3
#define SIGILL 4
#define SIGTRAP 5
#define SIGIOT 6
#define SIGABRT 6
#define SIGEMT 7
#define SIGFPE 8
#define SIGKILL 9
#define SIGBUS 10
#define SIGSEGV 11
#define SIGSYS 12
#define SIGPIPE 13
#define SIGALRM 14
#define SIGTERM 15
#define SIGUSR1 16
#define SIGUSR2 17
#define SIGCLD 18
#define SIGPWR 19
#define SIGWINCH 20
#if M_XOUT
#define SIGPOLL 20
#else
#define SIGPOLL 22
#endif
#define SIGCHLD SIGCLD /* compatibility */
#if M_UNIX
#define SIGSTOP 23
#define SIGTSTP 24
#define SIGCONT 25
#define SIGTTIN 26
#define SIGTTOU 27
#define SIGALL (~(sigset_t)0L) /* All signals. */
#endif /* M_UNIX */
typedef long sigset_t;
#define sigbit(n) (1L << ((n) - 1))
#define sigemptyset(s) *(s) = ~SIGALL
#define sigfillset(s) *(s) = SIGALL
#define sigaddset(s,n) *(s) |= sigbit(n)
#define sigdelset(s,n) *(s) &= ~sigbit(n)
#define sigismember(set,n) ((*(set) & sigbit(n)) == sigbit(n))
/*
* Signal vector "template" used in sigaction call.
*/
struct sigaction {
void (*sa_handler)(); /* signal handler */
sigset_t sa_mask; /* signal mask to apply */
int sa_flags; /* see signal options below */
};
#define SA_NOCLDSTOP 1 /* ignore SIGCHLD */
#define SIG_ERR (void(*)(int))-1
#define SIG_DFL (void(*)(int))0
#define SIG_IGN (void(*)(int))1
#define SIG_HOLD (void(*)(int))2
extern int __CLIB kill(int,int), __CLIB getpid(void);
extern int __CLIB pause(void);
extern unsigned int __CLIB alarm(unsigned int seconds);
#define raise(s) kill(getpid(),s)
#else /* M_UNIX || M_XENIX */
#define SIGABRT 22 /* abort */
#define SIGFPE 8 /* floating point error */
#define SIGILL 4 /* illegal instruction */
#define SIGINT 2 /* interrupt */
#define SIGSEGV 11 /* segment violation */
#define SIGTERM 15 /* terminate */
#define SIGBREAK 6 /* ctrl-break */
int __CLIB raise(int);
#define SIG_DFL (void (__CLIB *)(int)) 0
#define SIG_ERR (void (__CLIB *)(int)) 1
#define SIG_IGN (void (__CLIB *)(int)) 2
#endif
#if __cplusplus
}
#endif
#endif /* __SIGNAL_H */